# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt


# roc_auc = auc(fpr,tpr) ###计算auc的值

lw = 2
plt.xticks([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1],fontsize=20)
plt.yticks([70,75,80,85,90,95],fontsize=20)
plt.xlim([0.0,1.0])
plt.ylim([70, 95])

fpr_umdl=np.array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])
tpr_umdl=np.array([18.5, 31.4, 37.6])
fpr_pul=np.array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])
tpr_pul=np.array([59.67,	69.67,	76.23,	88.53])

plt.plot(fpr_umdl,tpr_umdl, color='blue',
         lw=lw, label='mAP')
plt.plot(fpr_pul,tpr_pul, color='red',
         lw=lw, label='Rank-1')

# plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--')

plt.xlabel('Weight of DCR',fontsize=20)
plt.ylabel('Accurancy(%)',fontsize=20)
plt.title('Market1501(Single query)',fontsize=20)
plt.legend(loc="lower right",fontsize=20)
plt.savefig('M-M', bbox_inches='tight')